{include file="public/header"}
<title>需求列表</title>
</head>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 日志管理
    <span class="c-gray en">&gt;</span> 日志列表
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">

    <div class="mt-20">
        <table class="table table-border table-bordered table-bg table-hover table-sort">
            <thead>
            <tr class="text-c">
                <th width="80">序号</th>
                <th width="80">订单号</th>
                <th width="80">操作人</th>
                <th width="80">内容</th>
                <th width="80">时间</th>

            </tr>
            </thead>
            <tbody>
            {volist name='data' id='vo'}
            <tr class="text-c">
                <td>{$vo.id}</td>
                <td><?php if(empty($vo['ord_id'])){ ?> 暂无 <?php }else{ ?> {$vo.ord_id} <?php }?> </td>
                <td>{$vo.admin_id}</td>
                <td>{$vo.content}</td>
                <td>{:date('Y-m-d H:i:s',$vo.created_at)}</td>



            </tr>
            {/volist}
            </tbody>
        </table>
        <div class="pages" style="float: right">{$data->render()}</div>

    </div>
</div>

{include file="public/footer"}
<script type="text/javascript">

    /**
     * 接单提醒
     */
    $('.add').click(function () {

        var src="{:Url('index/config/dan_add')}";
        layer.open({
            type: 2,
            area: ['500px', '300px'],
            fix: false,
            maxmin: true,
            shade:0.4,
            title: '添加标签',
            content: src
        });
    });

    /**
     * 删除
     */
    $('.del').click(function () {
        var id=$(this).attr('data-id');
        var obj={};
        obj.id=id;
        var src="{:Url('index/config/dan_del')}";
        layer.confirm('确认要删除吗？', function (index) {
            $.ajax({
                type: 'POST',
                url: src,
                dataType: 'json',
                data: obj,
                success: function (data) {
                    var res=JSON.parse(data);
                    if(res.code==200){
                        layer.msg(res.msg, {icon: 1, time: 2000}, function () {
                            setTimeout("window.location.reload()", 1);
                        });
                    }else{
                        layer.msg(res.msg,{icon: 5,time:1000});
                    }

                },
                error: function (data) {
                    console.log(data.msg);
                },
            });
        });
    });

    $('.edit').click(function () {
        var id=$(this).attr('data-id');
        var src="{:Url('index/config/dan_edit')}";
        layer.open({
            type: 2,
            area: ['500px', '300px'],
            fix: false,
            maxmin: true,
            shade:0.4,
            title: '编辑标签模板',
            content: src+'?id='+id
        });
    });

</script>
</body>
</html>